package gcc;

import java.lang.reflect.Method;
import java.util.concurrent.TimeUnit;

/**
 * @author CBeann
 * @create 2020-04-19 1:43
 */
public class HelloGCBK {
  public static void main(String[] args) throws Exception {

    int size = 700;


    Class<?> clazz = Class.forName("gcc.TestModel");

    TestModel testModel = new TestModel();



    for (int i = 0; i < size; i++) {

      //jni调用转为本地调用
     int inflationThreshold = 16;

      for (int i1 = 0; i1 < inflationThreshold; i1++) {
        Method method = clazz.getMethod("setField" + i, String.class);
        method.invoke(testModel, String.valueOf(i));
      }
    }

    try {
      TimeUnit.SECONDS.sleep(Integer.MAX_VALUE);
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
    }

    System.out.println(testModel);
  }
}
